
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %> 
<%@ page import="data.BitacoraDataMapper" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Modificar Bitacora</title>
    </head>
    <body>
        <html:form action="/ModificarBitacora2" method="post" >
            <h1>Bitacoras pertenecientes al profesor:</h1><br>
            
            <table border="1" width="10" cellspacing="2" cellpadding="2">
                <thead>
                    <tr>
                        <th><b>ID</b></th>
                        <th><b>Curso</b></th>
                        <th><b>Grupo</b></th>
                    </tr>
                </thead>
                <tbody>
                    <%
                    BitacoraDataMapper mapper = new BitacoraDataMapper();
                    ResultSet rs = mapper.obtenerBitacorasProfesor(request.getSession().getAttribute("CedProf").toString());
                    if(rs!=null){
                        while(rs.next()){
                                out.println("<tr>");
                                out.println("<td>"+rs.getString(1) +"</td>");
                                out.println("<td>"+rs.getString(2) +"</td>");
                                //out.println("<td>"+rs.getString(3) +"</td>");
                                out.println("</tr>");
                        }
                    }
                    %>
                    
                </tbody>
            </table>

        <p>  
        <h1>Digite el ID de la bitacora a modificar:</h1><br>
        <input type="text" name="ID" value="" size="15" />
        <html:submit>Continuar</html:submit> <br>
        <html:errors />
        </p>
</html:form>
<html:link page="/index.jsp"><- Ir al indice</html:link>
</body>
</html>
